<form id="pagerForm" method="post" action="{:url('Reback/index')}">
    <input type="hidden" name="order_sn" value="{$order_sn}"/>
    <input type="hidden" name="status" value="{$refund_status}"/>
    <input type="hidden" name="pageNum" value="{$pageNum}"/>
</form>
<div class="pageHeader">
    <form onsubmit="return navTabSearch(this);" action="{:url('Reback/index')}" method="post">
        <div class="searchBar">
            <table class="searchContent">
                <tr>
                    <td>
                        <label>订单编号：</label>
                        <input type="text" name="order_sn" value="{$order_sn}"/>
                    </td>
                    <td>
                        <label>处理状态：</label>
                        <select class="combox" name="status">
                            <option value="-1" selected="selected">全部</option>
                            <option value="1" {eq name="$refund_status" value="1"}selected="selected"{/eq} >已申请</option>
                            <option value="2" {eq name="$refund_status" value="2"}selected="selected"{/eq} >退款中</option>
                            <option value="3" {eq name="$refund_status" value="3"}selected="selected"{/eq} >已退款</option>
                            <option value="5" {eq name="$refund_status" value="5"}selected="selected"{/eq} >拒绝退款</option>
                        </select>
                    </td>
                    <td>
                        <label>检车站：</label>
                        <select name="company_id" class="combox">
                            <option value="0">全部</option>
                            {volist name="company" id="item"}
                            <option value="{$item.id}" {eq name="company_id" value="$item.id"}selected{/eq}>{$item.company_name}</option>
                            {/volist}
                        </select>
                    </td>
                </tr>
            </table>
            <div class="subBar">
                <ul>
                    <li>
                        <div class="buttonActive">
                            <div class="buttonContent">
                                <button type="submit">搜索</button>
                            </div>
                        </div>
                    </li>
                </ul>
            </div>
        </div>
    </form>
</div>
<div class="pageContent">
    <table class="table" width="100%" layoutH="108">
        <thead>
        <tr>
            <th width="8%">订单编号</th>
            <th width="6%">商家名称</th>
            <th width="4%">商品价格</th>
            <th width="4%">订单总价</th>
            <th width="4%">支付金额</th>
            <th width="6%">支付流水号</th>
            <th width="5%">处理状态</th>
            <th width="8%">支付时间</th>
            <th width="8%">更新时间</th>
            <th width="6%">操作</th>
        </tr>
        </thead>
        <tbody>
        {volist name="list" id="vo"}
        <tr target="userId">
            <td>{$vo.order_sn}</td>
            <td>{$vo.company_id|get_company_name}</td>
            <td>{$vo.goods_price}</td>
            <td>{$vo.total_amount}</td>
            <td>{$vo.order_amount}</td>
            <td>{$vo.transaction_id}</td>
            <td>
                {switch name="$vo.refund_status"}
                {case value="1"}
                已申请
                {/case}
                {case value="2"}
                退款中
                {/case}
                {case value="3"}
                已退款
                {/case}
                {case value="5"}
                申请失败
                {/case}
                {/switch}
            </td>
            <td>{$vo.pay_time|date="Y-m-d H:i:s",###}</td>
            <td>{$vo.update_time|date="Y-m-d H:i:s",###}</td>
            <td>
                <a rel="reback_manage_mods" class="adeditd" href="{:url('Reback/detail')}?id={$vo.order_id}" target="navTab"
                   width="900" height="550" title="详情" mask="true">详情</a>
                {if condition="($vo.refund_status eq 1) and ($vo.pay_status eq 1)"}
                <a rel="re_agreereback" style="color: purple;" class="adeditd" href="{:url('Reback/agreereback')}?id={$vo.order_id}" target="ajaxTodo" title="确认同意吗">同意</a>
                <a rel="re_refusereback" style="color: red;" class="adeditd" href="{:url('Reback/refusereback')}?id={$vo.order_id}" target="dialog" width="500" height="300" mask="true" title="确认拒绝吗">拒绝</a>
                {/if}
                {if condition="($vo.refund_status eq 2) and ($vo.order_status eq 4) and ($vo.pay_status eq 1)"}
                <a rel="re_surereback" style="color: green;" class="adeditd" href="{:url('Reback/surereback')}?id={$vo.order_id}" target="ajaxTodo" title="确认退款吗">确认</a>
                {/if}
            </td>
        </tr>
        {/volist}
        </tbody>
    </table>
    <div class="panelBar">
        <div class="pages">
            <span>共{$count}条</span>
        </div>
        <div class="pagination" targetType="navTab" totalCount="{$count}" numPerPage="{$numPerPage}" pageNumShown="10"
             currentPage="{$pageNum}"></div>
    </div>
</div>
